package io.github.thundzeng.miniemail.starter.autoconfigure;

import io.github.thundzeng.miniemail.core.MiniEmail;
import io.github.thundzeng.miniemail.core.MiniEmailFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * 建立 MiniEmail
 *
 * @author thunzeng
 */
@Configuration
@Import({MiniEmailFactoryAutoConfiguration.class})
public class MiniEmailAutoConfiguration {

    @Bean(value = "miniEmail")
    public MiniEmail miniEmail(MiniEmailFactory miniEmailFactory) {
        return miniEmailFactory.init();
    }

}
